﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;

namespace LabyCLI.Commands
{
	class cmd_copy
    {
        Terminal frm = Terminal.Instance;

        public void Main(List<string> args)
        {
            if (args.Count == 2)
            {
                if (File.Exists(args[0]))
                {
                    File.Copy(args[0], args[1], true);
                    Terminal.WriteLine("File was successfully copied." + Environment.NewLine, Properties.Settings.Default.Terminal_ErrorForeColor);
                }
                else
                {
                    Terminal.WriteLine("Invaild arguments." + Environment.NewLine, Properties.Settings.Default.Terminal_ErrorForeColor);
                }
            }
            else
            {
                Terminal.WriteLine("Invaild amount of arguments." + Environment.NewLine, Properties.Settings.Default.Terminal_ErrorForeColor);
            }
        }

        public void Main()
        {
            Terminal.WriteLine("Invaild amount of arguments." + Environment.NewLine, Properties.Settings.Default.Terminal_ErrorForeColor);
        }
    }
}
